﻿using GraphProcessor;
using IQIGame.Onigao.Logic;
using UnityEngine;

namespace IQIGame.Onigao.GamePlay.Editors
{
    [System.Serializable, NodeMenuItem(LevelEditorConst.Level + "/" + LevelEditorConst.Trigger + "/" + LevelEditorConst.SwitchPhysicalArea, typeof(LevelServiceGraph))]
    public class LevelServiceTriggerNode_SwitchPhysicalArea : LevelServiceTriggerNode
    {
        protected override ServiceTriggerType triggerType => ServiceTriggerType.SwitchPhysicalArea;

        protected override string triggerName => LevelEditorConst.SwitchPhysicalArea;
        [InspectorName("类型"), Tooltip("1电梯2房子")]
        public int type;
        [InspectorName("是否离开"), Tooltip("1离开区域，0进入区域")]
        public bool isOut;

        protected override LevelServiceCustomConfig CreateConfig()
        {
            return new LevelServiceTriggerCustom_SwitchPhysicalArea()
            {
                type = this.type,
                isOut = this.isOut
            };
        }
    }
}